package com.java.util;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import sun.misc.BASE64Encoder;

public class Base64Util {
	public static void main(String[] args) throws Exception{
		BASE64Encoder encoder = new BASE64Encoder();
		System.out.println("plase input user name:");
		String username = new BufferedReader(new InputStreamReader(System.in)).readLine();
		System.out.println(encoder.encode(username.getBytes()));
		System.out.println("plase input psw:");
		String psw = new BufferedReader(new InputStreamReader(System.in)).readLine();
		System.out.println(encoder.encode(psw.getBytes()));
	}
}
